<%@ page language="java" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
${aier_doctype}
<html <s:property value="aier_html_xmlns" escape="false"/>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>${aier_title}</title>
<meta content="${aier_keywords}" name="keywords">
<meta content="${aier_description}" name="description">
<link href="${aier_css_url}jc/chosen.css" rel="stylesheet">
<link rel="stylesheet" href="${aier_css_url}jq/jq.css" />
<link rel="stylesheet" href="${aier_css_url}${aier_jqui_css}/ui.css" />
<link rel="stylesheet" href="${aier_css_url}comm/text.css" />
<link rel="stylesheet" href="${aier_css_url}b.css" />
<link rel="stylesheet" href="${aier_css_url}social/module/jq-msg.css" />
<link rel="stylesheet" href="${aier_css_url}comm/fb.css" />

<script type="text/javascript" src="${aier_js_url}j.js"></script>
<script type="text/javascript" src="${aier_js_url}b.js"></script>
<script type="text/javascript" src="${aier_js_url}jp/hh/ui.js"></script>
<script type="text/javascript" src="${aier_js_url}jp/msg.js"></script>
<script type="text/javascript" src="${aier_js_url}lib/block.js"></script>
<script type="text/javascript" src="${aier_js_url}lib/arrayList.js"></script>
<script type="text/javascript" src="${aier_js_url}jc/cj.js"></script>
<script type="text/javascript" src="${aier_js_url}jq/jq.js"></script>
<script type="text/javascript" src="${aier_js_url}jq/cn.js"></script>
<script type="text/javascript" src="${aier_js_url}comm/text.js"></script>
<title>分配短信</title>
</head>
<script type="text/javascript">
$(document).ready(function(){
    $("#schoolinfo").jqGrid({                
        url:'${aier_url}${aier_urijs}message_searchAssignList${aier_suffix}?sid=${sid}',                
        datatype:"json",                
        mtype:'GET',
        height:'230',
        width:'600',              
        colNames:['学校名称','短信条数','分配时间'],                
        colModel:[                    
        {name:'name',index:'name',width:120,align:'center'},
        {name:'count',index:'count',width:120,align:'center'},
        {name:'adate',index:'adate',width:120,align:'center'}                       
        ],
        jsonReader: {
            root:"assignHistoryList",
            page: "page",
            total: "page_count",
            records : "count",
            repeatitems: false
        },
        pager: jQuery("#schoolpage"),
        prmNames : {page:"page",sort: "sort"},
        rowNum: 10,
        sortname: 'adate',
        hidegrid: false,
        sortorder: 'desc',
        viewrecords: true,
        caption: '分配短信',
        gridComplete:function(){
            var ids=jQuery("#schoolinfo").jqGrid('getDataIDs');
            for(var i=0; i<ids.length; i++){
                var id=ids[i]; 
                
                var adateStr = jQuery("#schoolinfo").jqGrid('getRowData', id).adate;
                if (!isnull(adateStr)) {
                    adateStr = adateStr.split("T")[0]+" "+adateStr.split("T")[1];;
                }
                jQuery("#schoolinfo").jqGrid('setRowData', ids[i], {adate:adateStr});
            }
        }
    }).navGrid("#schoolpage", { edit: false, add: false, del: false, search: false });
}); 
</script>
<body style="background-color: #EEF2FB;">
    
    <div style="background-color: #EEF2FB;width: 100%;height: 700px; ">	
		<div id="tabs">
			<ul>
				<li><a href="#tabs-1">分配短信</a></li>
			</ul>
			<div id="tabs-1" style="height: 500px;">
				<div class="d_content">
	                <div style="margin-top: 10px;">
	                    <button onclick="history.go(-1);"
	                        class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
	                        role="button" aria-disabled="false">
	                        <span class="ui-button-text">返回</span>
	                    </button>
	
	                </div>
					<!-- 表格 -->
					<div style="margin-left: 0px;margin-top: 10px;">
						<table id="schoolinfo"></table>
						<div id="schoolpage"></div>
					</div>
				</div>
				
			</div>
		</div>
	</div>
</body>
<script type="text/javascript">
	$("#tabs").tabs();

</script>
</html>